package com.nan.gbd.library.utils;

/**
 * Created by jiaqing on 2018/1/4.
 */

import android.os.Handler;
import android.os.Looper;

public final class MainThreadManager {
    private static Handler mManinHandler;
    private static Object mMainHandlerLock = new Object();
    public static Handler getMainHandler() {
        if (mManinHandler == null) {
            synchronized (mMainHandlerLock) {
                if (mManinHandler == null) {
                    mManinHandler = new Handler(Looper.getMainLooper());
                }
            }
        }
        return mManinHandler;
    }
}

